#ifndef  ACSVR_H
#define  ACSVR_H

#include <string>

class Acsvr{
public:
    Acsvr();
    ~Acsvr();

    int init();
    int deInit();

    void run();

    //void start();
    //void join();
    //void stop();

private:
    int createSocket(const std::string & ip, int port);

    int accept();

    int select();

    int readMsg(std::string & recvMsg);

    int handleMsg(const std::string & recvMsg,std::string & sendMsg);

    int writeMsg(const std::string & sendMsg);

private:
    int socket;
};

#endif   /* ACSVR_H */
